package cn.elead.chaos.sso.sample.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.elead.chaos.sso.core.user.LoginUser;
import cn.elead.chaos.sso.core.util.SsoUtils;

/**
 * 
 * @author luopeng
 *
 */
@Controller
public class IndexController {

	@ResponseBody
	@RequestMapping("/user")
	public LoginUser json(Model model, HttpServletRequest request) {
		LoginUser user = SsoUtils.getUser();
		return user;
	}

}